import Vue from 'vue';
import Router from 'vue-router';



Vue.use(Router);

export default new Router({
    model:'history',
    routes: [
        {
            path: '/',
            redirect: '/dashboard'
        },
        {
            path: '/',
            component: () => import(/* webpackChunkName: "home" */ '../components/common/Home.vue'),
            meta: { title: '自述文件' },
            children: [
                {
                    path: '/dashboard',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/Dashboard.vue'),
                    meta: { title: '系统首页' }
                },
                {
                    path: '/icon',
                    component: () => import(/* webpackChunkName: "icon" */ '../components/page/Icon.vue'),
                    meta: { title: '自定义图标' }
                },
                {
                    path: '/table',
                    component: () => import(/* webpackChunkName: "table" */ '../components/page/BaseTable.vue'),
                    meta: { title: '基础表格' }
                },
                {
                    path: '/tabs',
                    component: () => import(/* webpackChunkName: "tabs" */ '../components/page/Tabs.vue'),
                    meta: { title: 'tab选项卡' }
                },
                {
                    path: '/form',
                    component: () => import(/* webpackChunkName: "form" */ '../components/page/BaseForm.vue'),
                    meta: { title: '基本表单' }
                },
                {
                    // 富文本编辑器组件
                    path: '/editor',
                    component: () => import(/* webpackChunkName: "editor" */ '../components/page/VueEditor.vue'),
                    meta: { title: '富文本编辑器' }
                },
                {
                    // markdown组件
                    path: '/markdown',
                    component: () => import(/* webpackChunkName: "markdown" */ '../components/page/Markdown.vue'),
                    meta: { title: 'markdown编辑器' }
                },
                {
                    // 图片上传组件
                    path: '/upload',
                    component: () => import(/* webpackChunkName: "upload" */ '../components/page/Upload.vue'),
                    meta: { title: '文件上传' }
                },
                {
                    // vue-schart组件
                    path: '/charts',
                    component: () => import(/* webpackChunkName: "chart" */ '../components/page/BaseCharts.vue'),
                    meta: { title: 'schart图表' }
                },
                {
                    // 拖拽列表组件
                    path: '/drag',
                    component: () => import(/* webpackChunkName: "drag" */ '../components/page/DragList.vue'),
                    meta: { title: '拖拽列表' }
                },
                {
                    // 拖拽Dialog组件
                    path: '/dialog',
                    component: () => import(/* webpackChunkName: "dragdialog" */ '../components/page/DragDialog.vue'),
                    meta: { title: '拖拽弹框' }
                },
                {
                    // 国际化组件
                    path: '/i18n',
                    component: () => import(/* webpackChunkName: "i18n" */ '../components/page/I18n.vue'),
                    meta: { title: '国际化' }
                },
                {
                    // 权限页面
                    path: '/permission',
                    component: () => import(/* webpackChunkName: "permission" */ '../components/page/Permission.vue'),
                    meta: { title: '权限测试', permission: true }
                },
                {
                    path: '/404',
                    component: () => import(/* webpackChunkName: "404" */ '../components/page/404.vue'),
                    meta: { title: '404' }
                },
                {
                    path: '/403',
                    component: () => import(/* webpackChunkName: "403" */ '../components/page/403.vue'),
                    meta: { title: '403' }
                },
                {
                    path: '/donate',
                    component: () => import(/* webpackChunkName: "donate" */ '../components/page/Donate.vue'),
                    meta: { title: '支持作者' }
                },       
                {
                    path: '/userinfo',
                    component: () => import(/* webpackChunkName: "donate" */ '../components/page/Userinfo.vue'),
                    meta: { title: '用户信息' }
                },           
                {
                    path: '/commpany',
                    component: () => import(/* webpackChunkName: "donate" */ '../components/page/Commpany.vue'),
                    meta: { title: '公司信息' }
                },           
                {
                    path: '/lable',
                    component: () => import(/* webpackChunkName: "donate" */ '../components/page/Lable.vue'),
                    meta: { title: '标签信息' }
                },           
                {
                    path: '/add_lable',
                    component: () => import(/* webpackChunkName: "donate" */ '../components/page/Add_lable.vue'),
                    meta: { title: '添加标签' }
                },           
                {
                    path: '/good_type',
                    component: () => import(/* webpackChunkName: "donate" */ '../components/page/Good_type.vue'),
                    meta: { title: '货物类型' }
                },           
                {
                    path: '/add_good_type',
                    component: () => import(/* webpackChunkName: "donate" */ '../components/page/Add_good_type.vue'),
                    meta: { title: '添加货物类型' }
                },           
                {
                    path: '/update_goods',
                    component: () => import(/* webpackChunkName: "donate" */ '../components/page/Update_goods.vue'),
                    meta: { title: '修改货物类型' }
                },           
                {
                    path: '/add_client',
                    component: () => import(/* webpackChunkName: "donate" */ '../components/page/Add_client.vue'),
                    meta: { title: '添加客户' }
                },           
                {
                    path: '/client_info',
                    component: () => import(/* webpackChunkName: "donate" */ '../components/page/Client_info.vue'),
                    meta: { title: '添加客户' }
                },           
                {
                    path: '/add_order',
                    component: () => import(/* webpackChunkName: "donate" */ '../components/page/Add_order.vue'),
                    meta: { title: '添加运单' }
                },           
                {
                    path: '/order_list',
                    component: () => import(/* webpackChunkName: "donate" */ '../components/page/Order_list.vue'),
                    meta: { title: '运单列表' }
                },           
                {
                    path: '/send',
                    component: () => import(/* webpackChunkName: "donate" */ '../components/page/Send.vue'),
                    meta: { title: '发货' }
                },           
                {
                    path: '/receive',
                    component: () => import(/* webpackChunkName: "donate" */ '../components/page/Receive.vue'),
                    meta: { title: '收货' }
                },           
                {
                    path: '/order_info',
                    component: () => import(/* webpackChunkName: "donate" */ '../components/page/Order_info.vue'),
                    meta: { title: '运单信息' }
                },           
                {
                    path: '/read_order',
                    component: () => import(/* webpackChunkName: "donate" */ '../components/page/Read_order.vue'),
                    meta: { title: '运单详情' }
                },           
                {
                    path: '/all_info',
                    component: () => import(/* webpackChunkName: "donate" */ '../components/page/All_info.vue'),
                    meta: { title: '运单详情' }
                },           
                {
                    path: '/path_analysis',
                    component: () => import(/* webpackChunkName: "donate" */ '../components/page/Path_analysis.vue'),
                    meta: { title: '物流线路分析' }
                },           
            ]
        },
        {
            path: '/login',
            component: () => import(/* webpackChunkName: "login" */ '../components/page/Login.vue'),
            meta: { title: '登录' }
        },
        {
            path: '/reg',
            component: () => import(/* webpackChunkName: "reg" */ '../components/page/Reg.vue'),
            meta: { title: '注册' }
        },
        {
            path: '/forgetpwd',
            component: () => import(/* webpackChunkName: "forgetpwd" */ '../components/page/Forgetpwd.vue'),
            meta: { title: '忘记密码' }
        },
        {
            path: '/resetpwd',
            component: () => import(/* webpackChunkName: "forgetpwd" */ '../components/page/resetpwd.vue'),
            meta: { title: '重置密码' }
        },
        {
            path: '*',
            redirect: '/404'
        },


    ]
});
